#【黑夜狂欢】初始设置：提示开始，设置bossbar为显示，重置快速刷新冷却time
# execute if score DayTime System matches 12000 run tellraw @a [{"text":"空投 ","color":"green","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"结束 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"黑夜狂欢","color":"dark_red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 即将到来","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
execute if score DayTime System matches 13000 run title @a title [{"text":"","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
execute if score DayTime System matches 13000 run title @a subtitle [{"text":"黑夜狂欢降临 ","color":"red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"乱斗开始","color":"dark_blue","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
execute if score DayTime System matches 13000 run scoreboard players set NightTime System 0
execute if score DayTime System matches 13000 run scoreboard players set NightCD System 0

#【黑夜狂欢】bossbar操作
execute if score DayTime System matches 13000..23000 run scoreboard players add NightTime System 1
execute store result bossbar minecraft:night_time value run scoreboard players get NightTime System

#【黑夜狂欢】冷却加速效果
execute if score DayTime System matches 13000..23000 run scoreboard players add NightCD System 1
execute if score NightCD System matches 30.. run scoreboard players remove @e[scores={EFLocks=0,skCDPearl=1..}] skCDPearl 1
execute if score NightCD System matches 30.. run scoreboard players remove @e[scores={EFLocks=0,skCDEXBottle=1..}] skCDEXBottle 1
execute if score NightCD System matches 30.. run scoreboard players remove @e[scores={EFLocks=0,skCDEgg=1..}] skCDEgg 1
execute if score NightCD System matches 30.. run scoreboard players remove @e[scores={EFLocks=0,skCDJPG=1..}] skCDJPG 1
execute if score NightCD System matches 30.. run scoreboard players remove @e[scores={EFLocks=0,skCDSnowball=1..}] skCDSnowball 1
execute if score NightCD System matches 30.. run scoreboard players set NightCD System 0

#【黑夜狂欢】结束处理：设置bossbar为隐藏，提示结束语
execute if score DayTime System matches 23000 run tellraw @a [{"text":"黑夜狂欢 ","color":"dark_red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"结束","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]

#夜晚的时间是正常白天的2/3倍
execute if score DayTime System matches 13000..22999 run time add 1
